Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed gazebo camera depth not aligned with lidar #434

Open
wants to merge 1 commit into
base: humble
Choose a base branch
from

Conversation

matlabbe
Copy link

Description

As also observed in that post, in simulation, it seems the horizontal_fov parameter of rgbd_camera gazebo's sensor is not applied correctly either to published camera_info or how the rgb/depth images are captured in the simulator.

<!-- Gazebo links and joints -->
<gazebo reference="${name}_rgb_camera_frame">
<sensor name="rgbd_camera" type="rgbd_camera">
<camera>
<horizontal_fov>1.25</horizontal_fov>
<image>
<width>320</width>
<height>240</height>

It seems that we have to use original fov value 1.047 instead of 1.25 (from this example) so that data published look fine. See comparison below.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Commands used to test:

ros2 launch turtlebot4_ignition_bringup turtlebot4_ignition.launch.py slam:=false nav2:=true rviz:=true
ros2 run teleop_twist_keyboard teleop_twist_keyboard

then add DepthCloud plugin in rviz2 to show camera point cloud, and set global fixed frame to base_link.

With current value 1.25, we can see that the point cloud generated from the camera's depth is not aligned with the lidar (robot is not moving):
2024-06-29_19-18
2024-06-29_19-20

With the fix (setting value to 1.047), the alignment is as good as we could expect. Here the same point of view than above with this PR:
2024-06-29_19-22
2024-06-29_19-24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant